{* $Id$ *}{include_core file="admin/lib/header.html" title="{if $status == 0}回收{/if}订单详情"}
<style>
    .js_order_operation hr {
        display: none;
    }
</style>
<div class="page-header border-bottom clearfix">
    <h2 class="left">{if $status == 0}回收{/if}订单详情</h2>
    <div class="right js_order_operation" style="padding-top: 10px;">
        {if $order_info.status}
        {include file="part/dealer_order_operation.html"}
        {/if}
    </div>
</div>
<table class="list-table" style="width:600px">
    <thead>
    <tr>
        <th style="width:100px;">名称</th>
        <th>内容</th>
    </tr>
    </thead>
    <tbody class="js_cup_list">
    <tr>
        <td>订单号{if $status == 0}<span style="color: #f00;">已删除</span>{/if}</td>
        <td>{order_helper::order_id_encode($order_info['id'])}</td>
    </tr>
    <tr>
        <td>订单类型</td>
        <td>{order_config::$order_type[$order_info.type]}</td>
    </tr>
    <tr>
        <td>订单状态</td>
        <td>{order_config::$dealer_progress[$order_info.progress]}</td>
    </tr>
    <tr>
        <td>订单总金额/元</td>
        <td>{$order_info.price}</td>
    </tr>
    <tr>
        <td>商品总数量/箱</td>
        <td>{$order_info.goods_num + $order_info.exchange_num}</td>
    </tr>
    <tr>
        <td>商品总体积(预估)</td>
        <td>{$order_info.order_cube} m³</td>
    </tr>
    <tr>
        <td>商品总重量(预估)</td>
        <td>{$order_info.order_weight} kg</td>
    </tr>
    <tr>
        <td>收货人</td>
        <td>
            {$order_info.receiver}
        </td>
    </tr>
    <tr>
        <td>收货人电话</td>
        <td>{$order_info.mobile}</td>
    </tr>
    <tr>
        <td>收货地址</td>
        <td>
            {if $order_info.region}{$order_info.region} {/if}{$order_info.dealer_address}
        </td>
    </tr>
    {$order_relation_list = $order_info.order_relation}
    {$relation_count = count($order_relation_list)}
    {foreach $order_relation_list as $k => $order_relation_info}
    <tr>
        {if $k == 0}
        <td rowspan="{$relation_count}">购买商品详情</td>
        {/if}
        <td>
            {$goods_info = goods_helper::get_goods_info($order_relation_info['goods_id'])}
            <p>商品名称：{$goods_info['title']}</p>
            <p>商品单价：{$order_relation_info.goods_price}</p>
            <p>实际支付总价：{$order_relation_info.real_price}</p>
            <p>商品数量：{$order_relation_info.goods_num}</p>
        </td>
    </tr>
    {/foreach}
    {$order_exchange_relation = $order_info.order_exchange_relation}
    {$exchange_relation_count = count($order_exchange_relation)}
    {foreach $order_exchange_relation as $k => $order_exchange_relation_info}
    <tr>
        {if $k == 0}
        <td rowspan="{$exchange_relation_count}">兑换商品详情</td>
        {/if}
        <td>
            {$goods_info = goods_helper::get_goods_info($order_exchange_relation_info['goods_id'])}
            <p>商品名称：{$goods_info['title']}</p>
            <p>商品单价：{$order_exchange_relation_info.goods_price}</p>
            <p>实际支付总价：{$order_exchange_relation_info.real_price}</p>
            <p>商品数量：{$order_exchange_relation_info.goods_num}</p>
        </td>
    </tr>
    {/foreach}
    {$cup_list_count = count($cup_list_info)}
    {$cup_name_list = cup_config::$cup_type}
    {foreach $cup_list_info as $k => $v}
    <tr>
        {if current($cup_list_info) === $v}
        <td rowspan="{$cup_list_count}">杯型详情</td>
        {/if}
        <td>
            <p>杯型：{$cup_name_list[$v['cup_type']]}</p>
            <p>应发杯数：{$v['cup_num']}</p>
            <p>超发抵扣：{$v['less_cup_num']}</p>
            <p>实发杯数：{$v['true_cup_num']}</p>
        </td>
    </tr>
    {/foreach}
    <tr>
        <td>订单备注</td>
        <td>{$order_info.note}</td>
    </tr>
    {if $order_info['progress'] == order_config::DEALER_CANCEL}
    <tr>
        <td>订单取消理由</td>
        <td>{$order_info['reason']}</td>
    </tr>
    {/if}
    {if $order_info['progress'] > order_config::DEALER_WAIT_PAY}
    {if $order_info.confirm_money_user_id > 0}
    <tr>
        <td rowspan="3">订单扣款信息</td>
        <td>{user_helper::display_name($order_info.confirm_money_user_id)}</td>
    </tr>
    <tr>
        <td>{$order_info.confirm_money}</td>
    </tr>
    <tr>
        <td>{$order_info.confirm_money_time}</td>
    </tr>
    {/if}
    {if $order_info.deliver_time > '0000-00-00 00:00:00'}
    <tr>
        <td rowspan="3">订单发货信息</td>
        <td>{$order_info.express_name}</td>
    </tr>
    <tr>
        <td>{$order_info.express_no}</td>
    </tr>
    <tr>
        <td>{$order_info.express_note}</td>
    </tr>
    {/if}
    {if $order_info.confirm_payoff_time > '0000-00-00 00:00:00'}
    <tr>
        <td style="color: red;">[旧]订单付款信息</td>
        <td>
            付款人: {$order_info.payoff_persion}<br/>
            付款金额: {$order_info.payoff_money}<br/>
            付款时间: {$order_info.payoff_time}<br/>
            助理确认付款时间: {$order_info.confirm_payoff_time}<br/>
            确认付款备注: {$order_info.payoff_extra}
        </td>
    </tr>
    {/if}
    {if $order_info.confirm_money_name != ''}
    <tr>
        <td style="color: red;">[旧]订单收款信息</td>
        <td>
            确认收款人: {$order_info.confirm_money_name}<br/>
            确认收款时间: {$order_info.confirm_money_time}<br/>
            确认收款备注: {$order_info.confirm_money_note}
        </td>
    </tr>
    {/if}
    {/if}
    {if $order_info.task_user_id}
    <tr>
        <td>代理下单人</td>
        <td>{user_helper::display_name($order_info.task_user_id)}</td>
    </tr>
    {/if}
    {if $order_info.task_desc}
    <tr>
        <td>代理下单备注</td>
        <td>{$order_info.task_desc}</td>
    </tr>
    {/if}
    {if $order_info['progress'] > order_config::DEALER_SENDING}
    <tr>
        <td>订单物流信息</td>
        <td>
            <p>物流公司：{$order_info['express_name']}</p>
            <p>物流编号：{$order_info['express_no']}</p>
            <p>备注：<br/>{$order_info['express_note']}</p>
        </td>
    </tr>
    {/if}
    </tbody>
</table>
<!--end:列表-->
{load_js file='zclip/jquery.zclip.min.js'}
{load_js file='zclip/ZeroClipboard.js'}
{load_js file='uploadify/jquery.uploadify.min.js'}
{load_js file='module/order_operation.js'}
{include_core file="module/dealer_order_minus.html"}
{include_core file="module/dealer_order_add_comments.html"}
{include_core file="module/dealer_order_confirm.html"}
{include_core file="module/dealer_order_print.html"}
{include_core file="module/dealer_order_send.html"}
{include_core file="module/dealer_order_done.html"}
{include_core file="module/dealer_order_cancel.html"}
{include_core file="admin/lib/footer.html"}